There are two solutions, depending on the situation
- Create a computer-to-computer network. Doing this will cause you to lose your internet connection. To do this, follow the instructions from Apple:
Choose Create Network from the Wi-Fi status icon in the menu bar.
If the icon isn’t in the menu bar, choose Apple menu > System Preferences, and then click Network. Click Wi-Fi and select the “Show Wi-Fi status in menu bar” checkbox.
Give the network a name, and select a channel from the pop-up menu. The default channel is 11, but you can choose a different channel.
Select the Require Password checkbox to protect your network with a password. Type the password users will need to enter in order to join your network. Do the following:
Type a password of exactly 5 ASCII characters or 10 hexadecimal digits if you chose “40-bit WEP (more compatible)” from the Security pop-up menu.
Type a password of exactly 13 ASCII characters or 26 hexadecimal digits if you chose “128-bit WEP” from the Security pop-up menu.
Other Wi-Fi-enabled computers within range can join the network you created by choosing it from their Wi-Fi status icon or by choosing it from the Network Name pop-up menu in the Wi-Fi pane of Network preferences.
Once you did that, connect your Mac mini to it. You can now access it from your browser.
2.Share your internet connection. To do that, follow these instructions:
Choose Apple menu > System Preferences and click Sharing.
Select Internet Sharing and click the checkbox if it isn’t checked.
Choose the Internet connection you want to share from the “Share your connection from” pop-up menu. For example, if you’re connected to the Internet over Ethernet, choose Ethernet.
Select how you want to share your Internet connection in the “To computers using” list. For example, if you want to share your Internet connection over AirPort, select AirPort.
If you share your Internet connection using AirPort, click AirPort Options and give your network a name and password.
Basically, use an ethernet cable on one of you devices and share it to the other device using Airport.