2016-09-26 103 views
0

是否有任何可能访问我的应用程序当前运行在虚拟框中的NetBeans上。由虚拟框中的netbeans创建的访问本地主机

我的详细情况是这样的:由8080

  • 有依赖关系的应用程序同时运行在localhost-数据库,Solr的...
  • 窗口虚拟机:

    1. 主机Ubuntu- NetBeans中打开本地主机虚框(对付IE)
    2. 有没有什么办法来访问:本地主机:从VB 8080,能够测试应用(连接数据库,Solr的...)还是在主机操作系统
  • 回答

    0

    https://netbeans.org/kb/docs/php/project-setup.html#runConfiguration

    指定新建项目

    运行配置的默认运行配置是用于运行PHP项目的存储设置。您可以为一个项目定义多个配置并在它们之间来回切换。例如,如果应用程序是在本地开发的并需要上传到远程生产服务器,则只需选择另一个运行配置。运行配置适用于运行和调试。运行配置满足以下常见的用例:

    Developing PHP web pages on a local machine with a local web server. 
    Executing PHP scripts using a local PHP engine. This approach is applied to PHP files that are not intended for outputting HTML. Therefore such scripts can be run without a browser. 
    Remote Development. The PHP source code and other application files are uploaded to a remote web server via FTP. This use case is common when the development is shared across multiple people. 
    A combination of the above use cases: an application is developed locally and deployed on a remote production server upon completion. During development, PHP scripts are executed if necessary. 
    

    当你创建一个新的PHP项目,创建项目的默认运行配置。要设置项目的默认运行配置,请从“运行配置”面板的“运行方式”下拉列表中选择相关选项。下列选项:运行配置:

    Local Web Site. To use this run configuration, you need the Apache http server installed and running. 
    Remote Web Site (FTP/SFTP) (Separate tutorial). To use this configuration, you need a hosting account on a remote server and an FTP account on this server. 
    Script. This run configuration does not require that a web server be installed and running. You only need a PHP engine. 
    

    创建其他运行配置,或编辑默认运行配置的过程中,自定义项目设置描述。除了使用现有项目的“属性”对话框而不是新建项目向导之外,它与创建默认运行配置的过程几乎完全相同。 本地网站

    本地网站配置涉及您的机器上安装的Apache Web服务器的Web文件夹中的PHP源文件夹副本。一个项目同时拥有本地和远程网站配置是常见做法。请注意,设置本地网站运行配置的过程略有不同,具体取决于您是从现有源创建项目还是不使用现有源。

    要建立一个本地网站配置:

    From the Run As dropdown list, choose Local Web Site. 
    In the Project URL field, check the automatically generated URL address. Make sure that the Apache HTTP server listens to the default port 80. If not, specify the port number explicitly, in the format localhost:<port number>. 
    Project Run Configuration: Local Web Server 
    If you are creating the project from existing sources, you can choose which source file to use as the index file. 
    To store the project's source files in a different directory than the NetBeans IDE project, select "Copy files from Sources Folder to another location". If you are creating a project from existing sources, this is a required step, unless the existing sources were already in the web folder of your Apache server. 
    The field by default specifies the following path: <Document Root>\<New PHP Project>. Use the Browse button to specify a different path, if necessary. 
    The document root is the folder where the web server looks for files to open in the browser. The document root is specified in the web server configuration file. 
    The wizard detects the Apache installation type, either a component or within a package, and provides the path to the default location of the htdocs folder for the current installation type. Therefore, if you accepted the default settings during the installation of the Apache server or the AMP package, choose the path from the dropdown list. 
    Click Finish. The IDE creates your PHP project. 
    

    远程Web站点

    参见教程部署PHP应用到远程Web服务器。 脚本

    From the Run As dropdown list, choose Script. 
    Project Properties dialog showing Run Configuration properties, with Run As...Script selected 
    To specify the location of the PHP engine, click the Configure button next to the Use Default PHP Interpreter box. The PHP Options dialog opens on the General tab. 
    Project Run Configuration: Script. Specifying the path to the PHP engine and the output location 
    In the PHP 5 Interpreter field, specify the path to the php.exe file. Use the Browse or Search... button, if necessary. 
    To specify how the script execution results will be shown, select the relevant checkbox in the Open Result In area. The following options are available: 
    
        Output Window. The results of executing a script will appear in the output window in the bottom of the NetBeans IDE window. 
        Web Browser. The default browser window will open with the results of executing a script in the form of an HTML file. 
        Editor. The results of executing a script will open as an HTML file in the IDE editor window. 
    Click OK. The Options dialog box closes and the system returns to the Run Configuration panel. 
    Add any arguments, such as debug=true, and any PHP command-line options. 
    

    自定义项目设置

    在项目创建的基本项目设置中定义:项目类型,项目源文件的位置,默认运行配置。要用新设置扩展项目设置,请自定义项目。将光标置于项目节点上,然后从弹出菜单中选择“属性”。 “项目属性”面板打开并显示设置类别列表。 源头

    在源头面板:

    The Web Root field shows the root folder of your application site. By default, the field shows the Sources folder. To change the web root, click Browse and select another folder. 
    Select the Copy files from Sources Folder to another location, if necessary, and specify the path to the storage folder. 
    Change the encoding, if necessary 
    Managing project setup: Project Properties dialog box 
    To complete the project customization, click OK. 
    

    运行配置

    在运行配置面板,修改默认运行配置和/或如果必要定义新的运行配置。

    To modify the default settings, update the fields as during the project creation. 
    To define a new run configuration, click New next to the Configuration dropdown list. The Create New Configuration dialog box opens. 
    In the Configuration Name field, enter the name of the new run configuration and click OK. You return to the Run Configuration panel. 
    Define the run configuration settings in the same way as you defined the default run configuration during the project creation and click OK. The new configuration is added to the Configuration dropdown list. 
    To remove a configuration, select it from the Configuration dropdown list and click Delete. 
    Managing project setup: Run configuration 
    To complete the project customization, click OK.